﻿<Window x:Class="OSTWin.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ost="clr-namespace:OSTWin"
        Title="{Binding Path=AppTitle}"
        Height="600" Width="800"
        Icon="/OSTWin;component/Resources/OST.ico"
        Loaded="Window_Loaded">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="38" />
            <RowDefinition Height="*" />
            <RowDefinition Height="100" />
        </Grid.RowDefinitions>
        <WrapPanel Name="wrpMenu" 
            Grid.Row="0" Grid.Column="0" >
            <Label Height="38" VerticalContentAlignment="Center">OST-Address:</Label>
            <TextBox Name="txtTargetAddress" Height="38" Width="170" VerticalContentAlignment="Center">http://opensuntracker.info</TextBox>
            <Button Name="btnConnect" Click="btnConnect_Click" Height="38" Width="60">Connect</Button>
        </WrapPanel>
        <TabControl Name="tabMain"
            Grid.Row="1" Grid.Column="0" 
		    Margin="0,0,0,0"
		    SelectionChanged="tabMain_SelectionChanged" >
            <TabItem Header="State" Height="38" Width="100">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="38"></RowDefinition>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>
                    <Button Name="btnUpdateState" Grid.Row="0" Click="btnUpdateState_Click" Content="Refresh"></Button>
                    <ost:ucState x:Name="ucState" Grid.Row="1"  DataContext="{Binding Client}"></ost:ucState>
                </Grid>
            </TabItem>
            <TabItem Header="Log" Height="38" Width="100">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="38"></RowDefinition>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>
                    <Button Name="btnUpdateRss" Grid.Row="0" Click="btnUpdateRss_Click" Content="Refresh"></Button>
                    <ost:ucLog x:Name="ucLog" Grid.Row="1" Margin="0,0,0,0" DataContext="{Binding Path=Client}"></ost:ucLog>
                </Grid>
            </TabItem>
            <TabItem Header="Configuration" Height="38" Width="100">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="38"></RowDefinition>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>
                    <Button Name="btnUpdateConfig" Grid.Row="0" Click="btnUpdateConfig_Click" Content="Refresh"></Button>
                    <ost:ucConfiguration x:Name="ucConfig"  Grid.Row="1"  Margin="0, 0,0,0" DataContext="{Binding Path=Client}"></ost:ucConfiguration>
                </Grid>
            </TabItem>
            <TabItem Header="Motor" Height="38" Width="100">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>
                    <ost:ucMotor x:Name="ucMotorMain" Grid.Row="0" Margin="0, 0,0,0" DataContext="{Binding Path=Client}"></ost:ucMotor>
                </Grid>
            </TabItem>
            <TabItem Header="Tracker" Height="38" Width="100">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>
                    <ost:ucTracker x:Name="ucTrackerMain" Grid.Row="0" Margin="0, 0,0,0" DataContext="{Binding Path=Client}"></ost:ucTracker>
                </Grid>
            </TabItem>
            <TabItem Header="System" Height="38" Width="100">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>
                    <ost:ucSystem x:Name="ucSystemMain" Grid.Row="0" Margin="0, 0,0,0" DataContext="{Binding Path=Client}"></ost:ucSystem>
                </Grid>
            </TabItem>
        </TabControl>
        <ost:ucStateLog x:Name="ucStateLogMain" Margin="0,0,0,0" DataContext="{Binding Path=Client}" Grid.Row="2" Grid.Column="0"></ost:ucStateLog>
    </Grid>
</Window>
